# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.CloudChannel.V1.Model.GoogleCloudChannelV1ReportValue do
  @moduledoc """
  A single report value.

  ## Attributes

  *   `dateTimeValue` (*type:* `GoogleApi.CloudChannel.V1.Model.GoogleTypeDateTime.t`, *default:* `nil`) - A value of type `google.type.DateTime` (year, month, day, hour, minute, second, and UTC offset or timezone.)
  *   `dateValue` (*type:* `GoogleApi.CloudChannel.V1.Model.GoogleTypeDate.t`, *default:* `nil`) - A value of type `google.type.Date` (year, month, day).
  *   `decimalValue` (*type:* `GoogleApi.CloudChannel.V1.Model.GoogleTypeDecimal.t`, *default:* `nil`) - A value of type `google.type.Decimal`, representing non-integer numeric values.
  *   `intValue` (*type:* `String.t`, *default:* `nil`) - A value of type `int`.
  *   `moneyValue` (*type:* `GoogleApi.CloudChannel.V1.Model.GoogleTypeMoney.t`, *default:* `nil`) - A value of type `google.type.Money` (currency code, whole units, decimal units).
  *   `stringValue` (*type:* `String.t`, *default:* `nil`) - A value of type `string`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :dateTimeValue => GoogleApi.CloudChannel.V1.Model.GoogleTypeDateTime.t() | nil,
          :dateValue => GoogleApi.CloudChannel.V1.Model.GoogleTypeDate.t() | nil,
          :decimalValue => GoogleApi.CloudChannel.V1.Model.GoogleTypeDecimal.t() | nil,
          :intValue => String.t() | nil,
          :moneyValue => GoogleApi.CloudChannel.V1.Model.GoogleTypeMoney.t() | nil,
          :stringValue => String.t() | nil
        }

  field(:dateTimeValue, as: GoogleApi.CloudChannel.V1.Model.GoogleTypeDateTime)
  field(:dateValue, as: GoogleApi.CloudChannel.V1.Model.GoogleTypeDate)
  field(:decimalValue, as: GoogleApi.CloudChannel.V1.Model.GoogleTypeDecimal)
  field(:intValue)
  field(:moneyValue, as: GoogleApi.CloudChannel.V1.Model.GoogleTypeMoney)
  field(:stringValue)
end

defimpl Poison.Decoder, for: GoogleApi.CloudChannel.V1.Model.GoogleCloudChannelV1ReportValue do
  def decode(value, options) do
    GoogleApi.CloudChannel.V1.Model.GoogleCloudChannelV1ReportValue.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.CloudChannel.V1.Model.GoogleCloudChannelV1ReportValue do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
